package com.eureka.client.example.demo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: TestClients
 * @author: cxz
 * @date: 2020/10/27 20:07
 * @version: v1.0
 */
@RestController
@RequestMapping("/testOne")
public class TestClients {

    @Value("${eureka.instance.metadata-map.zone:hhh}")
    private String a;
    @Value("${server.port}")
    private String port;

    @GetMapping()
    public String testOne() throws Exception{
        System.out.println(a+"------------");


        return a+port;
    }
    @GetMapping("/test")
    public String testTwo() throws Exception{
        System.out.println(a+"------------");
        return a;
    }

}
